<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>onchange事件</title>
</head>
<body>
<input type="text" onchange="fn1()">
</body>
    <script>
        function fn1() {
            console.log("内容发生改变")
        }
    </script>
</html>